//
//  YuYueOrderDetailHelper.m
//  FD
//
//  Created by xiaofang wang on 2018/11/12.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//

#import "YuYueOrderDetailHelper.h"
//model
#import "CanPinMsgModel.h"
@interface YuYueOrderDetailHelper()
/**餐品信息数组*/
@property (nonatomic, strong) NSMutableArray *canPinMsgArrM;

@end

@implementation YuYueOrderDetailHelper

+ (void)requestYuYueOrderDetailWithOrderId:(NSString *)userOrderd
 {
    [FDHttpAPi requestUserYuYueOrderDetailWithUserOrderId:userOrderd successBlock:^(id responseObjc) {
        NSString *event = responseObjc[@"event"];
        if ([event isEqualToString:SUCCESS]) {
            
            NSArray *goodsList = responseObjc[@"data"][@"goodsList"];
            [self assembleCanPinMsgArrWithArr:goodsList];
            
        }else {
            [JRToast showWithText:responseObjc[describe]];
        }
    } failBlock:^(NSError *error) {
        FDLog(@"%@",[error localizedDescription]);
    }];
}

#pragma mark - 接口
#pragma mark - Private Method
+ (void)assembleCanPinMsgArrWithArr:(NSArray *)arr {
    for (NSDictionary *goodsDic in arr) {
        CanPinMsgModel *canPinMsgModel = [CanPinMsgModel mj_objectWithKeyValues:goodsDic];
        
    }
}


#pragma mark - 三 getter
- (NSMutableArray *)canPinMsgArrM {
    if (!_canPinMsgArrM) {
        _canPinMsgArrM = [NSMutableArray array];
    }
    return _canPinMsgArrM;
}

@end
